using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;

namespace RJB.S3.Entities
{
    public class File : EntityBase
    {
        private string _name;
        private string _folderName;
        private List<MetadataEntry> _metaData;
        private byte[] _contents = null;
        private DateTime _lastModified;
        private string _MD5hash;
        private long _size;
        
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
        public string FolderName
        {
            get { return _folderName; }
            set { _folderName = value; }
        }
        public List<MetadataEntry> MetaData
        {
            get { return _metaData; }
            set { _metaData = value; }
        }
        public byte[] Contents
        {
            get { return _contents; }
            set
            {
                _contents = value;
                this.Size = value.Length;
            }
        }
        public DateTime LastModified
        {
            get { return _lastModified; }
            set { _lastModified = value; }
        }
        public string MD5Hash
        {
            get { return _MD5hash; }
            set { _MD5hash = value; }
        }
        public long Size
        {
            get { return _size;}
            set { _size = value;}
        }
        
        public File(string FileName, string FolderName, string Owner) : base(Owner)
        {
            this.MetaData = new List<MetadataEntry>();
            this.Name = FileName;
            this.FolderName = FolderName;
        }
        
    }
}
